package _18;

public class _Zero {
    public static void main(String[] args) {
        Demo d = new Demo();

        try {
            System.out.println(d.div(200, 10));
            System.out.println(d.div(4, 0));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

class Demo{
    int div(int a , int b)throws Exception{
        if (b == 0){
            throw new Exception("由于除数b为0，不符合逻辑运算规则，终止程序的运行，请修改代码！");
        }else {
            return a / b;
        }
    }
}